package com.tanhua.dubbo.mappers;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tanhua.model.domain.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 问题选项数据层dao映射
 *
 * @author 李磊
 * @since 2022-01-14 10:01
 */

public interface OptionsMapper extends BaseMapper<Options> {

    @Select("select * from tb_options WHERE soul_question_id = #{soulQuestionId}")
    List<Options> findByQuestionId(@Param("soulQuestionId") Long soulQuestionId);



    @Select("select option_score from tb_options WHERE id = #{id}")
     Integer findScoreById(@Param("id")Long optionsId);

}
